Add allowlist for elevated device limits#387
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for an allowlist of client IDs that can have elevated device limits (100 instead of 50 active devices). The allowlist is configured via the HIGH_DEVICE_LIMIT_CLIENT_IDS environment variable with a comma-separated list of client IDs.
- Introduces a new
device_limit.gofile with device limit management functionality - Refactors the hard-coded device limit check to support dynamic limits based on client ID allowlist
- Adds comprehensive test coverage for both normal and elevated device limits
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| command/device_limit.go | New file implementing device limit logic with allowlist support for elevated limits |
| command/command.go | Removes hard-coded maxActiveDevices constant and uses new checkDeviceLimit function |
| command/command_test.go | Adds test helper for device info entities and comprehensive test for device limit enforcement with allowlist |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
lint fix: #388 |
af5c631 to
5bf0fef
Compare
5bf0fef to
a13b9bc
Compare
fmarier
reviewed
Dec 4, 2025
… high-limit-client-ids
8338651 to
87a3951
Compare
fmarier
approved these changes
Dec 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #383